<?php
/* Smarty version 3.1.31, created on 2019-08-19 16:07:43
  from "/data/www/wwwroot/phprap/application/home/view/history/login.html" */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.31',
  'unifunc' => 'content_5d5a58cf737278_75129201',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'b6a410b48d10553fb5639e764ae2f346e7576923' => 
    array (
      0 => '/data/www/wwwroot/phprap/application/home/view/history/login.html',
      1 => 1564463076,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_5d5a58cf737278_75129201 (Smarty_Internal_Template $_smarty_tpl) {
if (!is_callable('smarty_function_include_file')) require_once '/data/www/wwwroot/phprap/application/common/smarty/function.include_file.php';
echo smarty_function_include_file(array('name'=>'public/header','title'=>'登录历史'),$_smarty_tpl);?>


</head>

<body>

<div id="wrapper">

    <!-- Navigation -->
    <?php echo smarty_function_include_file(array('name'=>'public/nav','sidebar'=>'user_sidebar'),$_smarty_tpl);?>

    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">

                <h1 class="page-header">登录历史</h1>
                <div class="search">
                    <div class="well">

                        <form class="form-inline" action="<?php echo url();?>
" method="get">
                            <div class="form-group">
                                <label>登录IP</label>
                                <input type="text" name="search[ip]" class="form-control" placeholder="支持模糊查询" value="<?php echo $_smarty_tpl->tpl_vars['search']->value['ip'];?>
">
                            </div>
                            <div class="form-group">
                                <label>登录设备</label>
                                <select class="form-control" name="search[device]">
                                    <?php $_smarty_tpl->_assignInScope('devices', \app\user::get_device_list('title'));
?>
                                    <option value="">不限</option>
                                    <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['devices']->value, 'device', false, 'k');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['k']->value => $_smarty_tpl->tpl_vars['device']->value) {
?>
                                    <option value="<?php echo $_smarty_tpl->tpl_vars['k']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['k']->value == $_smarty_tpl->tpl_vars['search']->value['device']) {?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['device']->value;?>
</option>
                                    <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);
?>

                                </select>
                            </div>
                            <button type="submit" class="btn btn-primary">搜索</button>
                        </form>
                    </div>
                </div>
            </div>
            <!-- /.col-lg-12 -->
        </div>
        <!-- /.row -->
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">

                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <div class="table-responsive">
                            <table class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>登录时间</th>
                                    <th>登录IP</th>
                                    <th>登录地点</th>
                                    <th>登录设备</th>

                                </tr>
                                </thead>
                                <tbody>
                                <?php if ($_smarty_tpl->tpl_vars['historys']->value) {?>
                                <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['historys']->value, 'history');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['history']->value) {
?>
                                <?php $_smarty_tpl->_assignInScope('device', $_smarty_tpl->tpl_vars['history']->value['device']);
?>
                                <tr>
                                    <td ><?php echo $_smarty_tpl->tpl_vars['history']->value['add_time'];?>
</td>
                                    <td ><?php echo $_smarty_tpl->tpl_vars['history']->value['ip'];?>
</td>
                                    <td ><?php echo $_smarty_tpl->tpl_vars['history']->value['address'];?>
</td>
                                    <td >
                                        <?php echo \app\user::get_device_list('icon',$_smarty_tpl->tpl_vars['device']->value);?>

                                    </td>
                                </tr>
                                <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);
?>

                                <?php }?>

                                </tbody>
                            </table>
                        </div>
                        <!-- /.table-responsive -->
                    </div>
                    <!-- /.panel-body -->
                </div>
                <!-- /.panel -->
            </div>
            <div class="col-sm-12">
                <?php echo smarty_function_include_file(array('name'=>'public/page'),$_smarty_tpl);?>

            </div>

            <!-- /.col-lg-6 -->
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <hr>
    <p class="text-center"><?php echo get_config('copyright');?>
</p>

    <?php echo smarty_function_include_file(array('name'=>'public/footer'),$_smarty_tpl);?>

<?php }
}
